﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Account/Site.master" AutoEventWireup="true" CodeFile="ctHuongDanThanhToan.aspx.cs" Inherits="Administrator_ctKienThucVeMat" %>

<%@ Register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana" 
        Font-Size="0.8em" PathSeparator=" : " style="font-size: small">
        <CurrentNodeStyle ForeColor="#333333" />
        <NodeStyle Font-Bold="True" ForeColor="#284E98" />
        <PathSeparatorStyle Font-Bold="True" ForeColor="#507CD1" />
        <RootNodeStyle Font-Bold="True" ForeColor="#507CD1" />
    </asp:SiteMapPath>
    <br />
    <asp:Label ID="Label1" runat="server" 
        style="font-size: x-large; font-weight: 700" 
        Text="Chi tiết Hướng dẫn đăng ký"></asp:Label>
    <br />
    <br />
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectServer %>" 
                DeleteCommand="DELETE FROM [KienThucVeMat] WHERE [ID] = @ID" 
                InsertCommand="INSERT INTO [KienThucVeMat] ([AnhDaiDien], [TieuDe], [NoiDung], [GioiThieu]) VALUES (@AnhDaiDien, @TieuDe, @NoiDung, @GioiThieu)" 
                SelectCommand="SELECT * FROM [KienThucVeMat] WHERE ([ID] = @ID)" 
                
                
        UpdateCommand="UPDATE [KienThucVeMat] SET [AnhDaiDien] = @AnhDaiDien, [TieuDe] = @TieuDe, [NoiDung] = @NoiDung, [GioiThieu] = @GioiThieu WHERE [ID] = @ID">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="AnhDaiDien" Type="String" />
            <asp:Parameter Name="TieuDe" Type="String" />
            <asp:Parameter Name="NoiDung" Type="String" />
            <asp:Parameter Name="GioiThieu" Type="String" />
        </InsertParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="AnhDaiDien" Type="String" />
            <asp:Parameter Name="TieuDe" Type="String" />
            <asp:Parameter Name="NoiDung" Type="String" />
            <asp:Parameter Name="GioiThieu" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" 
                DataSourceID="SqlDataSource2" EnableModelValidation="True" Width="100%" 
                oniteminserted="FormView1_ItemInserted" 
                onitemupdated="FormView1_ItemUpdated" CellPadding="4" 
        ForeColor="#333333">
        <EditItemTemplate>
                    ID:
                    <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
            <br />
                    Tiêu đề&nbsp; :
                    <asp:TextBox ID="TieuDeTextBox" runat="server" Text='<%# Bind("TieuDe") %>' 
                        Width="90%" />
            <br />
                    Ảnh đại diện :
                    <asp:FileUpload ID="UpdateAnh" runat="server" />
            <asp:HiddenField ID="HiddenField1" runat="server" 
                        Value='<%# Bind("AnhDaiDien") %>' />
            <br />
                    Giới thiệu :
                    <asp:TextBox ID="GioiThieuTextBox" runat="server" 
                        Text='<%# Bind("GioiThieu") %>' TextMode="MultiLine" Width="90%" />
            <br />
                    Nội dung :
                    <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath="~/fckeditor/" 
                        Height="200px" Value='<%# Bind("NoiDung") %>' Width="100%">
            </FCKeditorV2:FCKeditor>
            <br />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                        CommandName="Update" Text="Update" />
&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" 
                        CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <InsertItemTemplate>
                    ID:
                    <asp:Label ID="IDLabel2" runat="server" Text='<%# Eval("ID") %>' />
            <br />
                    Tiêu đề&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
                    <asp:TextBox ID="TieuDeTextBox0" runat="server" Text='<%# Bind("TieuDe") %>' 
                        Width="90%" />
            <br />
                    Ảnh đại diện :
                    <asp:FileUpload ID="InsertAnh" runat="server" />
            <br />
                    Giới thiệu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
                    <asp:TextBox ID="GioiThieuTextBox0" runat="server" 
                        Text='<%# Bind("GioiThieu") %>' TextMode="MultiLine" Width="90%" />
            <br />
                    Nội dung :
                    <FCKeditorV2:FCKeditor ID="FCKeditor2" runat="server" BasePath="~/fckeditor/" 
                        Height="200px" Value='<%# Eval("NoiDung") %>' Width="100%">
            </FCKeditorV2:FCKeditor>
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="TieuDeTextBox0" Display="None" 
                        ErrorMessage="Tiêu đề không được rỗng"></asp:RequiredFieldValidator>
            <br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="GioiThieuTextBox0" Display="None" 
                        ErrorMessage="Trường giới thiệu không được rỗng"></asp:RequiredFieldValidator>
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                        CommandName="Insert" Text="Insert" />
                    &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                        CausesValidation="False" CommandName="Cancel" Text="Cancel" 
                        onclick="InsertCancelButton_Click" />
        </InsertItemTemplate>
        <ItemTemplate>
                    ID:
                    <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
            <br />
                    Tiêu đề :
                    <asp:Label ID="TieuDeLabel" runat="server" 
                Text='<%# Bind("TieuDe") %>' />
            <br />
                    Ảnh đại diện
                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("AnhDaiDien") %>' 
                        Height="212px" Width="200px" />
            <br />
                    Giới thiệu :
                    <asp:Label ID="GioiThieuLabel" runat="server" 
                Text='<%# Bind("GioiThieu") %>' />
            <br />
                    Nội dung :
                    <asp:Label ID="NoiDungLabel" runat="server" 
                Text='<%# Bind("NoiDung") %>' />
            <br />
            <br />
            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                        CommandName="Edit" Text="Edit" />
                    &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                        CommandName="Delete" Text="Delete" />
                    &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                        CommandName="New" Text="New" />
        </ItemTemplate>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
    </asp:FormView>
    <asp:LinkButton ID="LinkButton2" runat="server" 
        PostBackUrl="~/Administrator/KienThucVeMat.aspx" CausesValidation="False">Về danh sách</asp:LinkButton>
</asp:Content>

